@(modelForView: model.forview.NodeRelationModelForView)
@main(modelForView.mainModelForView) {

<!-- CONTENT -->
<div class="span12">
	<div class="well">
		<h4>Родители</h4>
	</div>
	<table class="table table-striped table-bordered table-condensed">
			<thead>
				<tr>
					<th>#</th>
					<th>Название узла</th>
					<th>Иерархия</th>
					<th>Тип</th>
					<th>Создатель</th>
				</tr>
			</thead>
		<tbody>
		@for(i <- 0 until modelForView.getParentsSize()){
			
			<tr>
				<td>@modelForView.getIndex(i)</td>
				<td>
					<a href="@routes.Hierarchy.getPageNodeRelation(modelForView.getParents().get(i).getId())">@modelForView.getParents().get(i).getTitle()</a> 
				</td>
				<td>
					<a href="@routes.Hierarchy.node(0, modelForView.getParents().get(i).getStructure().getId())" target="_blank">
						@modelForView.getParents().get(i).getStructure().getTitle()
					</a>
				</td>
				<td>
					<a href="@routes.Types.getType(modelForView.getParents().get(i).getType().getID())" target="_blank">
						@modelForView.getParents().get(i).getType().getTitle()
					</a>
				</td>
				<td>@modelForView.getParents().get(i).getCreator().getFullName()</td>
			</tr>
		}
		</tbody>
	</table>
</div>

<div class="span12">
	<div class="well">
		<h4>Информация об узле</h4>
	</div>
	<!-- NODE TITLE -->
	 <div class="well">
		<b>Имя узла: </b>
		<a href="@routes.Hierarchy.node(modelForView.getNodeId(), 0)" target="_blank">
			@modelForView.getNodeTitle()
		</a><br/>
		<b>Имя иерерхии: </b>
		<a href="@routes.Hierarchy.node(0, modelForView.getStructureId())" target="_blank">
			@modelForView.getStructureTitle()
		</a><br/>
		<a class="btn btn-info" href="@modelForView.getAddRelativeLink()">Добавить новую связь.</a>
	</div>

	
</div>

<div class="span12">
	<div class="well">
		<h4>Потомки</h4>
	</div>
	<table class="table table-striped table-bordered table-condensed">
			<thead>
				<tr>
					<th>#</th>
					<th>Название узла</th>
					<th>Иерархия</th>
					<th>Тип</th>
					<th>Создатель</th>
				</tr>
			</thead>
		<tbody>
		@for(i <- 0 until modelForView.getChildrenSize()){
			
			<tr>
				<td>@modelForView.getIndex(i)</td>
				<td>
					<a href="@routes.Hierarchy.getPageNodeRelation(modelForView.getChildren().get(i).getId())">@modelForView.getChildren().get(i).getTitle()</a> 
				</td>
				<td>
					<a href="@routes.Hierarchy.node(0, modelForView.getChildren().get(i).getStructure().getId())" target="_blank">
						@modelForView.getChildren().get(i).getStructure().getTitle()
					</a>
				</td>
				<td>
					<a href="@routes.Types.getType(modelForView.getChildren().get(i).getType().getID())" target="_blank">
						@modelForView.getChildren().get(i).getType().getTitle()
					</a>
				</td>
				<td>@modelForView.getChildren().get(i).getCreator().getFullName()</td>
			</tr>
		}
		</tbody>
	</table>
</div>
}
